-
Notifications
You must be signed in to change notification settings - Fork 150
Improve logging #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve logging #809
Conversation
|
@hiroshihorie @bcherry I decided to rewrite it from scratch (without waiting for v3), as the previous setup was kinda problematic in multiple ways. Let me know what you think, especially is there anything "harder to understand than before" for the consumer. The output looks nice(r) already, can be filtered more easily, etc.: ![]() |
@pblazej Nice, do we have a example app branch for this ? If not I'll make one. |
@hiroshihorie I think these are the only changes you need to make - feel free to test it in spare time 👍 (ofc you can even omit this change) ![]() |
|
||
private let minLevel: LogLevel | ||
|
||
public init(minLevel: LogLevel = .info, rtc: Bool = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default level is ofc opinionated here, we can go for .warning
as well (no consensus on other platforms)... We use these logs sparingly, so for normal connection you just get a couple of messages.
Turns out that the configuration closure:
If we need the flexibility anyway, maybe it's better to drop the
swift-logging
right now...My assupmtions: